package org.ohuyo.libra.admin.actions;

import java.math.BigInteger;

import javax.annotation.Resource;

import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Result;
import org.ohuyo.libra.admin.dao.AdminDao;

import com.opensymphony.xwork2.ActionSupport;

/**
 * 
 * @author rabbit
 * 
 */
@Action("/admin/info")
@Result(name = "success", location = "/admin/info.jsp")
public class AppInfoAction extends ActionSupport {

	@Resource(name = "libra.admin.adminDao")
	private AdminDao adminDao;

	private BigInteger loginNum;
	private BigInteger jumpNum;
	private BigInteger appNum;

	/**
	 * 
	 */
	private static final long serialVersionUID = -7993143495988221135L;

	public String execute() throws Exception {
		loginNum = adminDao.countLoginTicket();
		jumpNum = adminDao.countJumpTicket();
		appNum = adminDao.countAppTicket();
		return super.execute();
	}

	public BigInteger getLoginNum() {
		return loginNum;
	}

	public void setLoginNum(BigInteger loginNum) {
		this.loginNum = loginNum;
	}

	public BigInteger getJumpNum() {
		return jumpNum;
	}

	public void setJumpNum(BigInteger jumpNum) {
		this.jumpNum = jumpNum;
	}

	public BigInteger getAppNum() {
		return appNum;
	}

	public void setAppNum(BigInteger appNum) {
		this.appNum = appNum;
	}

}
